package com.market.plus.ocm.model;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

import org.springframework.web.multipart.commons.CommonsMultipartFile;

public class MetadataScaleFile {

   private int height;

   private int width;

   private long size;

   private byte[] bytes;

   private CommonsMultipartFile originalFile;

   public int getHeight() {
      return height;
   }

   public void setHeight(int height) {
      this.height = height;
   }

   public int getWidth() {
      return width;
   }

   public void setWidth(int width) {
      this.width = width;
   }

   public CommonsMultipartFile getOriginalFile() {
      return originalFile;
   }

   public void setOriginalFile(CommonsMultipartFile originalFile) {
      this.originalFile = originalFile;
   }

   public long getSize() {
      return size;
   }

   public void setSize(long size) {
      this.size = size;
   }

   public byte[] getBytes() {
      return bytes;
   }

   public void setBytes(byte[] bytes) {
      this.bytes = bytes;
   }
   
   public InputStream getInputStream(){
      ByteArrayInputStream in = null;
      if (this.bytes != null){
         in = new ByteArrayInputStream(this.bytes);
      }
      return in;
   }
}
